package com.tgy;

import com.alibaba.dubbo.rpc.*;
import org.apache.log4j.MDC;

/***
 * @ClassName: ComsumerFilter
 * @Description:
 * @Auther: 送你一块二向箔
 * @Date: 9:47 2022/5/6
 * @version : V1.0
 */
public class ComsumerFilter implements Filter {
    @Override
    public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
        //RpcContext是dubbo里面，调用链上有一个map上下文
        RpcContext.getContext().setAttachment("hello","world");
        return invoker.invoke(invocation);
    }
}
